﻿<%<hi:common_new_header runat="server" skinname="/ascx/JsNewTags/Skin-Common_New_Header.ascx" />%>
<link href="http://res.juseshop.com/templates/master/jusekeji/style/style.css" rel="stylesheet" />
<Hi:TemplateStyle ID="Style1" runat="server" Href="http://res.juseshop.com/templates/master/jusekeji/style/menu.css"></Hi:TemplateStyle>
<Hi:TemplateStyle ID="TemplateStyle1" runat="server" Href="http://res.juseshop.com/templates/master/jusekeji/style/index.css"></Hi:TemplateStyle>
<Hi:TemplateStyle ID="Stylel" runat="server" Href="http://res.juseshop.com/templates/master/jusekeji/style/css_activity.css"></Hi:TemplateStyle>
<form runat="server">
<div class="main">
<script src="http://res.juseshop.com/utility/validate/pagevalidator.js" type="text/javascript"></script>
<div class="re_friend_tab">
	 
	  <h2 class="re_productreviews_h2">商品咨询</h2>
<div class="re_blogit_pro_t"><strong>当前咨询商品</strong><span class="color_A30"> 【<%<Hi:ProductDetailsLink ID="ProductDetailsLink1" runat="server"></Hi:ProductDetailsLink> %>】</span></div>

<%<Hi:SmallStatusMessage id="Status" runat="server" Visible="False" />%>
 
      <table width="100%" border="0" cellspacing="0" class="re_productreviews_tabc">
        <tr>
          <td width="12%" align="right" valign="top">昵称：</td>
          <td colspan="2">
            <%<asp:TextBox id="txtUserName" CssClass="inpnt" runat="Server" Width="200" ></asp:TextBox> %>
            <span id="txtUserNameTip" runat="server"></span>
          </td>
        </tr>
        <tr>
          <td align="right" valign="top">电子邮箱：</td>
          <td colspan="2"><%<asp:TextBox id="txtEmail" CssClass="inpnt" runat="Server" Width="200" ></asp:TextBox> %>
            <span id="txtEmailTip" runat="server"></span></td>
        </tr>
        <tr>
          <td align="right" valign="top">内容：</td>
          <td colspan="2" class="pinginnon"><%<asp:TextBox id="txtContent" Height="100" Width="430" TextMode="MultiLine" runat="Server"></asp:TextBox> %><span id="txtContentTip" runat="server"></span></td>
        </tr>
        <tr>
<table  width="100%"  border="0" cellpadding="0" cellspacing="0"  >
            <tr>
               <td height="40" width="40" align="center"  >&nbsp;</td>
               <td  valign="middle" >
               
                <ul style="margin-top:10px; height:auto;overflow:hidden;">
                 
                    <li style="float:left; margin-left:5px;">
                        
                        <span>
                            <span style="  display:block; padding-top:4px; width:70px; text-align:right; float:left;">验证码：</span>
                             <input type=text id="txtConsultationCode" runat="server" style="width:50px; float:left;" class="input2" />&nbsp;<img id="img_txtNumber" src="" alt="" />
                            <a href="javascript:refreshReviewCode();" ><img id="imgReviewVerifyCode" src='' style="border-style:none;" alt=""/></a>
                            <script language="javascript" type="text/javascript">
                                document.getElementById('imgReviewVerifyCode').src = applicationPath + "/VerifyCodeImage.aspx";
                                function refreshReviewCode() {
                                    var img = document.getElementById("imgReviewVerifyCode");

                                    if (img != null) {
                                        var currentDate = new Date();
                                        img.src = applicationPath + "/VerifyCodeImage.aspx?t=" + currentDate.getTime();
                                    }
                                }
                            </script>
                        </span>
                    
                    </li>
                    <li style="float:left;margin-left:25px; width:270px;">
                    <%<asp:Button runat="server" ID="btnRefer" CssClass="btn_shortsub" OnClientClick="return PageIsValid();" ValidationGroup="valsIntroduced" Text="咨询" />%>
                        <span class="colorF"><%<asp:hyperlink id="hpkProductConsultations" runat="server" cssclass="Product_b" Text="查看全部咨询信息"/>%></span>
                    </li>
                </ul>
                                
               </td>              
            </tr>
          </table>
        </tr>
        <tr>
          
        </tr>
      </table>
 
</div>

<script type="text/javascript" language="javascript">
        function InitValidators() {
            initValid(new InputValidator('ProductConsultations_txtUserName', 1, 30, false, null, '请输入您的名字，不能为空长度限制在1-30之间'))
            initValid(new InputValidator('ProductConsultations_txtEmail', 3, 256, false,'[\\w-]+(\\.[\\w-]+)*@[\\w-]+(\.[\\w-]+)+','请输入正确的邮箱，不能为空长度限制在3-256之间'))
            initValid(new InputValidator('ProductConsultations_txtContent', 1, 300, false, null, '请输入评论内容，不能为空长度限制在1-300之间'))
        }
        $(document).ready(function () {
            InitValidators();
            $("#img_txtNumber").hide();
            $("#ProductConsultations_txtConsultationCode").keyup(function () {
                var value = $(this).val();
                if (value.length < 4) {
                    $("#img_txtNumber").hide();
                    temp = "";
                }
                else if (value.length == 4) {
                    if (temp != value) {
                        $("#img_txtNumber").show();
                        $.ajax({
                            url: "ProductConsultations.aspx",
                            type: 'post', dataType: 'json', timeout: 10000,
                            data: {
                                isCallback: "true",
                                code: $("#ProductConsultations_txtConsultationCode").val()
                            },
                            async: false,
                            success: function (resultData) {
                                var flag = resultData.flag;
                                if (flag == "1") {
                                    $("#img_txtNumber").attr("src", "/images/true.gif");
                                }
                                else if (flag == "0") {
                                    $("#img_txtNumber").attr("src", "/images/false.gif");
                                }
                            }
                        });
                    }
                    temp = value;
                }
            });
          });
    </script>
</div>
</form><%<hi:common_new_footer runat="server" />%>
